<!DOCTYPE html>
<html lang="en">
  <head>
    <title>FileDescriptor Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Class/FileDescriptor" class="dashAnchor"></a>
    <a title="FileDescriptor Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Venice Docs</a> (100% documented)</p>
        <p class="header-right"><a href="https://github.com/Zewo/Venice"><img src="../img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Venice Reference</a>
        <img id="carat" src="../img/carat.png" />
        FileDescriptor Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Coroutines.html">Coroutines</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Coroutine.html">Coroutine</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Coroutine/Group.html">– Group</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Channels.html">Channels</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Channel.html">Channel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Channel.html#/s:CC6Venice7Channel7Sending">– Sending</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Channel.html#/s:CC6Venice7Channel9Receiving">– Receiving</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../File Descriptors.html">File Descriptors</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/FileDescriptor.html">FileDescriptor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/FileDescriptor/PollEvent.html">– PollEvent</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Time.html">Time</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/Duration.html">Duration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Deadline.html">Deadline</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Int.html">Int</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Errors.html">Errors</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/VeniceError.html">VeniceError</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>FileDescriptor</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">FileDescriptor</span></code></pre>

                </div>
              </div>
            <p>A file descriptor used to access a file or other input/output resource,
such as a pipe or network socket.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC6Venice14FileDescriptor6handleVs5Int32"></a>
                    <a name="//apple_ref/swift/Property/handle" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC6Venice14FileDescriptor6handleVs5Int32">handle</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>File descriptor handle.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">handle</span><span class="p">:</span> <span class="kt"><a href="../Classes/FileDescriptor.html#/s:C6Venice14FileDescriptor6Handle">Handle</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:C6Venice14FileDescriptor6Handle"></a>
                    <a name="//apple_ref/swift/Alias/Handle" class="dashAnchor"></a>
                    <a class="token" href="#/s:C6Venice14FileDescriptor6Handle">Handle</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>File descriptor handle.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Handle</span> <span class="o">=</span> <span class="kt">Int32</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:ZvC6Venice14FileDescriptor13standardInputS0_"></a>
                    <a name="//apple_ref/swift/Variable/standardInput" class="dashAnchor"></a>
                    <a class="token" href="#/s:ZvC6Venice14FileDescriptor13standardInputS0_">standardInput</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Standard input file descriptor</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">standardInput</span> <span class="o">=</span> <span class="k">try!</span> <span class="kt">FileDescriptor</span><span class="p">(</span><span class="kt">STDIN_FILENO</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:ZvC6Venice14FileDescriptor14standardOutputS0_"></a>
                    <a name="//apple_ref/swift/Variable/standardOutput" class="dashAnchor"></a>
                    <a class="token" href="#/s:ZvC6Venice14FileDescriptor14standardOutputS0_">standardOutput</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Standard output file descriptor</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">standardOutput</span> <span class="o">=</span> <span class="k">try!</span> <span class="kt">FileDescriptor</span><span class="p">(</span><span class="kt">STDOUT_FILENO</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:ZvC6Venice14FileDescriptor13standardErrorS0_"></a>
                    <a name="//apple_ref/swift/Variable/standardError" class="dashAnchor"></a>
                    <a class="token" href="#/s:ZvC6Venice14FileDescriptor13standardErrorS0_">standardError</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Standard error file descriptor</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">standardError</span> <span class="o">=</span> <span class="k">try!</span> <span class="kt">FileDescriptor</span><span class="p">(</span><span class="kt">STDERR_FILENO</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Venice14FileDescriptorcFzVs5Int32S0_"></a>
                    <a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Venice14FileDescriptorcFzVs5Int32S0_">init(_:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates a <code>FileDescriptor</code> from a file descriptor handle.</p>
<div class="aside aside-warning">
    <p class="aside-title">Warning</p>
    <p>This operation will configure the file descriptor as non-blocking.</p>

</div>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    <p>The following errors might be thrown:</p>
<h4 id='veniceerror-invalidfiledescriptor' class='heading'>VeniceError.invalidFileDescriptor</h4>

<p>Thrown when the operation is performed on an invalid file descriptor.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">handle</span><span class="p">:</span> <span class="kt"><a href="../Classes/FileDescriptor.html#/s:C6Venice14FileDescriptor6Handle">Handle</a></span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>fileDescriptor</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Previously opened file descriptor.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Venice14FileDescriptor4readFzTVs29UnsafeMutableRawBufferPointer8deadlineVS_8Deadline_Vs22UnsafeRawBufferPointer"></a>
                    <a name="//apple_ref/swift/Method/read(_:deadline:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Venice14FileDescriptor4readFzTVs29UnsafeMutableRawBufferPointer8deadlineVS_8Deadline_Vs22UnsafeRawBufferPointer">read(_:deadline:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Reads from the file descriptor.</p>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    <p>The following errors might be thrown:</p>
<h4 id='veniceerror-readfailed' class='heading'>VeniceError.readFailed</h4>

<p>Thrown when <code>read</code> operation fails.</p>
<h4 id='veniceerror-invalidfiledescriptor' class='heading'>VeniceError.invalidFileDescriptor</h4>

<p>Thrown when <code><a href="../Classes/FileDescriptor.html#/s:vC6Venice14FileDescriptor6handleVs5Int32">handle</a></code> is not an open file descriptor.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">read</span><span class="p">(</span>
        <span class="n">_</span> <span class="nv">buffer</span><span class="p">:</span> <span class="kt">UnsafeMutableRawBufferPointer</span><span class="p">,</span>
        <span class="nv">deadline</span><span class="p">:</span> <span class="kt"><a href="../Structs/Deadline.html">Deadline</a></span>
    <span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt">UnsafeRawBufferPointer</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>buffer</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Buffer in which the data will be read to.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>deadline</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code>deadline</code> is a point in time when the operation should timeout.
Use the <code>.fromNow()</code> function to get the current point in time.
Use <code>.immediate</code> if the operation needs to be performed without blocking.
Use <code>.never</code> to allow the operation to block forever if needed.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>Buffer containing the amount of bytes read.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Venice14FileDescriptor5writeFzTVs22UnsafeRawBufferPointer8deadlineVS_8Deadline_T_"></a>
                    <a name="//apple_ref/swift/Method/write(_:deadline:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Venice14FileDescriptor5writeFzTVs22UnsafeRawBufferPointer8deadlineVS_8Deadline_T_">write(_:deadline:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Writes to the file descriptor.</p>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    <p>The following errors might be thrown:</p>
<h4 id='veniceerror-writefailed' class='heading'>VeniceError.writeFailed</h4>

<p>Thrown when <code>write</code> operation fails.</p>
<h4 id='veniceerror-invalidfiledescriptor' class='heading'>VeniceError.invalidFileDescriptor</h4>

<p>Thrown when <code><a href="../Classes/FileDescriptor.html#/s:vC6Venice14FileDescriptor6handleVs5Int32">handle</a></code> is not an open file descriptor.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">write</span><span class="p">(</span><span class="n">_</span> <span class="nv">buffer</span><span class="p">:</span> <span class="kt">UnsafeRawBufferPointer</span><span class="p">,</span> <span class="nv">deadline</span><span class="p">:</span> <span class="kt"><a href="../Structs/Deadline.html">Deadline</a></span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>buffer</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Buffer which will be written to the file descriptor.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>deadline</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code>deadline</code> is a point in time when the operation should timeout.
Use the <code>.fromNow()</code> function to get the current point in time.
Use <code>.immediate</code> if the operation needs to be performed without blocking.
Use <code>.never</code> to allow the operation to block forever if needed.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Venice14FileDescriptor5closeFzT_T_"></a>
                    <a name="//apple_ref/swift/Method/close()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Venice14FileDescriptor5closeFzT_T_">close()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Closes a file descriptor, so that it no longer refers to any
file and may be reused.  Any record locks held on the
file it was associated with, and owned by the process, are removed
(regardless of the file descriptor that was used to obtain the lock).</p>
<div class="aside aside-warning">
    <p class="aside-title">Warning</p>
    <p>If <code><a href="../Classes/FileDescriptor.html#/s:vC6Venice14FileDescriptor6handleVs5Int32">handle</a></code> is the last file descriptor referring to the underlying open
<em>file description</em>, the resources associated with the
open file description are freed; if the file descriptor was the last
reference to a file which has been removed using <code>unlink</code>, the file
is deleted.</p>

</div>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    <p>The following errors might be thrown:</p>
<h4 id='veniceerror-invalidfiledescriptor' class='heading'>VeniceError.invalidFileDescriptor</h4>

<p>Thrown when <code><a href="../Classes/FileDescriptor.html#/s:vC6Venice14FileDescriptor6handleVs5Int32">handle</a></code> is not an open file descriptor.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">close</span><span class="p">()</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Venice14FileDescriptor6detachFzT_Vs5Int32"></a>
                    <a name="//apple_ref/swift/Method/detach()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Venice14FileDescriptor6detachFzT_Vs5Int32">detach()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Detaches the underlying <code><a href="../Classes/FileDescriptor.html#/s:vC6Venice14FileDescriptor6handleVs5Int32">handle</a></code>.
After <code>detach</code> any operation on the <code>FileDescriptor</code> will throw an error.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">@discardableResult</span> <span class="kd">public</span> <span class="kd">func</span> <span class="nf">detach</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Classes/FileDescriptor.html#/s:C6Venice14FileDescriptor6Handle">Handle</a></span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>The underlying file descriptor.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:ZFC6Venice14FileDescriptor4pollFzTVs5Int325eventOS0_9PollEvent8deadlineVS_8Deadline_T_"></a>
                    <a name="//apple_ref/swift/Method/poll(_:event:deadline:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:ZFC6Venice14FileDescriptor4pollFzTVs5Int325eventOS0_9PollEvent8deadlineVS_8Deadline_T_">poll(_:event:deadline:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Waits for the file descriptor to become either readable/writable
or to get into an error state. Either case leads to a successful return
from the function. To distinguish the two outcomes, follow up with a
read/write operation on the file descriptor.</p>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    <p>The following errors might be thrown:</p>
<h4 id='veniceerror-invalidfiledescriptor' class='heading'>VeniceError.invalidFileDescriptor</h4>

<p>Thrown when the operation is performed on an invalid file descriptor.</p>
<h4 id='veniceerror-canceledcoroutine' class='heading'>VeniceError.canceledCoroutine</h4>

<p>Thrown when the operation is performed within a canceled coroutine.</p>
<h4 id='veniceerror-filedescriptorblockedinanothercoroutine' class='heading'>VeniceError.fileDescriptorBlockedInAnotherCoroutine</h4>

<p>Thrown when another coroutine is already blocked on <code>poll</code> with this file descriptor.</p>
<h4 id='veniceerror-deadlinereached' class='heading'>VeniceError.deadlineReached</h4>

<p>Thrown when the operation reaches the deadline.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">poll</span><span class="p">(</span><span class="n">_</span> <span class="nv">handle</span><span class="p">:</span> <span class="kt"><a href="../Classes/FileDescriptor.html#/s:C6Venice14FileDescriptor6Handle">Handle</a></span><span class="p">,</span> <span class="nv">event</span><span class="p">:</span> <span class="kt"><a href="../Classes/FileDescriptor/PollEvent.html">PollEvent</a></span><span class="p">,</span> <span class="nv">deadline</span><span class="p">:</span> <span class="kt"><a href="../Structs/Deadline.html">Deadline</a></span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>event</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Use <code>.read</code> to wait for the file descriptor to become readable.
Use <code>.write</code> to wait for the file descriptor to become writable.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>deadline</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code>deadline</code> is a point in time when the operation should timeout.
Use the <code>.fromNow()</code> function to get the current point in time.
Use <code>.immediate</code> if the operation needs to be performed without blocking.
Use <code>.never</code> to allow the operation to block forever if needed.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:ZFC6Venice14FileDescriptor5cleanFVs5Int32T_"></a>
                    <a name="//apple_ref/swift/Method/clean(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:ZFC6Venice14FileDescriptor5cleanFVs5Int32T_">clean(_:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Erases cached info about a file descriptor.</p>

<p>This function drops any state that Venice associates with
the file descriptor.</p>
<div class="aside aside-warning">
    <p class="aside-title">Warning</p>
    <code>clean</code> has to be called with file descriptors provided by
third-party libraries, just before returning them back to
their original owners. Otherwise the behavior is <strong>undefined</strong>.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">clean</span><span class="p">(</span><span class="n">_</span> <span class="nv">handle</span><span class="p">:</span> <span class="kt"><a href="../Classes/FileDescriptor.html#/s:C6Venice14FileDescriptor6Handle">Handle</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:OC6Venice14FileDescriptor9PollEvent"></a>
                    <a name="//apple_ref/swift/Enum/PollEvent" class="dashAnchor"></a>
                    <a class="token" href="#/s:OC6Venice14FileDescriptor9PollEvent">PollEvent</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Event used to poll file descriptors for reading or writing.</p>

                        <a href="../Classes/FileDescriptor/PollEvent.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">PollEvent</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2017 <a class="link" href="http://zewo.io" target="_blank" rel="external">Zewo</a>. All rights reserved. (Last updated: 2017-05-20)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
